package com.longge;

public class DetectCapitalUse {

    public boolean detectCapitalUse(String word) {

       return word.toUpperCase().equals(word)||word.toLowerCase().equals(word)||word.endsWith(word.substring(1).toLowerCase());
    }
}
